<include file="Public:header" />
<load href="__JS__/upload/uploadify.css" />
<load href="__JS__/swfobject.js" />
<script type="text/javascript" src="__JS__/jquery.uploadify.v2.1.4.min.js"></script> 
<script type="text/javascript" src="__JS__/jianfanzhuanhuan.js"></script>
<div class="content">
<!-----------------------------------------内容开始--------------------------------------------------->
<div class="infoBox">
<form name="form" action="{:U('dotou_jieguo')}" method="post" onsubmit="return checkform();">
<input type="hidden" name="id" value="{$id}" />


<table width="100%" border="0" cellpadding="0" cellspacing="0" id="basic">

<php>
if(empty($tou_shi_id)){
</php>
<tr>
	<td class="infoBoxTd">所属投票主题：</td>
	<td colspan="2">
		<select name="tid" >
			<option value="0">请选择</option>
			<volist name="tou" id="tou">
				<option value="{$tou.id}" >{$tou.name}</option>
			</volist>
		</select>

	</td>
</tr>


<tr>
	<td class="infoBoxTd">所属投票事项：</td>
	<td colspan="2">
		<select name="sid" >
			<option value="0" >请选择</option>
			<volist name="tous" id="tous">
				<option value="{$tous.id}" >{$tous.name}</option>
			</volist>
		</select>

	</td>
</tr>


<tr>
	<td class="infoBoxTd">所属投票选项：</td>
	<td colspan="2">
		<select name="xid" >
			<option value="0" >请选择</option>
			<volist name="toux" id="toux">
				<option value="{$toux.id}" >{$toux.name}</option>
			</volist>
		</select>

	</td>
</tr>

<php>
}else{
</php>
<tr>
	<td class="infoBoxTd">所属投票事项：</td>
	<input type="hidden" name="ssid" value="{$tou_shi.id}" />
	<input type="hidden" name="stid" value="{$tou_shi.tid}" />
	<td colspan="2">
		{$tou_shi.name}
	</td>
</tr>
<tr>
	<td class="infoBoxTd">所属投票选项：</td>
	<td colspan="2">
		<select name="sxid" >
			<option value="0" >请选择</option>
			<volist name="tou_xuan_all" id="tou_xuan_all">
				<option value="{$tou_xuan_all.id}" >{$tou_xuan_all.name}</option>
			</volist>
			<volist name="tou_xuan_dan" id="tou_xuan_dan">
				<option value="{$tou_xuan_dan.id}" >{$tou_xuan_dan.name}</option>
			</volist>
		</select>

	</td>
</tr>

<php>
}
</php>

<tr>
	<td class="infoBoxTd">基数：</td>
	<td colspan="2">
	<INPUT name="jishu" value="{$jishu}" class="formTitle xzzsinput" size="80" maxlength="10" >
	</td>
</tr>

</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="infoBoxTd">&nbsp;</td>
<td align="left">
	<input type="submit" name="Button1" value="保存" class="formInput01" />
</td>
</tr>
</table>
</form>
</div>
<!-----------------------------------------内容结束--------------------------------------------------->
</div>
<script language="javascript">

//表单验证
function checkform(){

	var ssid = $('input[name="ssid"]').val();
	
	if(ssid>0){
		var sx = $('select[name="sxid"]').val();
		if(sx == ''){
			ui.error('请选择投票选项');
			return false;
		}
	
	}else{
		var t = $('select[name="tid"]').val();
		if(t == ''){
			ui.error('请选择投票主题');
			return false;
		}
		var s = $('select[name="sid"]').val();
		if(s == ''){
			ui.error('请选择投票事项');
			return false;
		}
		var x = $('select[name="xid"]').val();
		if(x == ''){
			ui.error('请选择投票选项');
			return false;
		}
	}
}

</script>
    

<include file="Public:footer" />
